These plots display coverage across the entire 18S, 28S, and 5s rRNA sequence. Counts are normalized by library size.
18s rRNA
sample_info_table <- read_tsv("sample_info.txt", col_names = c("cell type", "virus type", "time"))
datatable(sample_info_table)
#18S rRNA coverage plots
data_dir_18S = "~/Dropbox (Hesselberth Lab)/Rachel_data/EndoU_project/18S/exp1/"
data_files_18S = list.files(data_dir_18S, full.names = T)
read_file <- function(x) {
df <- readr::read_tsv(x, col_names = c("chrom", "start", "end", "count", "normalized_count", "dinuc"))
df$name <- basename(x)
df
}
table_18S <- purrr::map_df(data_files_18S, read_file) %>%
mutate(name = str_replace(name, ".r18s.bg", "")) %>%
separate(name, into = c('cell', 'virus', 'time'), sep = '_')
datatable(table_18S)
## Warning in instance$preRenderHook(instance): It seems your data is too
## big for client-side DataTables. You may consider server-side processing:
## https://rstudio.github.io/DT/server.html
plot_18S <- ggplot(table_18S, aes(x = start, y = normalized_count, fill = time, width = 5)) +
geom_bar(stat = "identity", position = 'identity') +
scale_fill_brewer(palette="Set1") +
theme_cowplot() +
facet_grid(virus ~ cell) +
theme(axis.text.x = element_text(angle = 60, hjust = 1)) +
scale_x_continuous(breaks=seq(0, 2000, 250)) +
labs(x="Position", y="Normalized counts (counts/total reads)") +
ggtitle("18S rRNA coverage plots")
plot_18S

# Previously documented RNaseL cleavage site 542 and 771 in 18S rRNA
plot_18S_542 <- ggplot(table_18S, aes(x = start, y = normalized_count, fill = time)) +
geom_bar(stat = "identity", position = 'dodge') +
scale_fill_brewer(palette = 'Set1') +
theme_cowplot() +
facet_grid(virus ~ cell) +
theme(axis.text.x = element_text(angle = 60, hjust = 1)) +
labs(x="Position", y="Normalized counts (counts/total reads)") +
xlim(530, 560) +
ggtitle("RNaseL cleavage site 542 in 18S rRNA")
plot_18S_542
## Warning: Removed 58140 rows containing missing values (geom_bar).

plot_18S_771 <- ggplot(table_18S, aes(x = start, y = normalized_count, fill = time)) +
geom_bar(stat = "identity", position = 'dodge') +
scale_fill_brewer(palette = 'Set1') +
theme_cowplot() +
facet_grid(virus ~ cell) +
theme(axis.text.x = element_text(angle = 60, hjust = 1)) +
labs(x="Position", y="Normalized counts (counts/total reads)") +
xlim(760, 780) +
ggtitle("RNaseL cleavage site 771 in 18S rRNA")
plot_18S_771
## Warning: Removed 58481 rows containing missing values (geom_bar).

28s rRNA
#28S rRNA coverage plots
data_files_28S = list.files("~/Dropbox (Hesselberth Lab)/Rachel_data/EndoU_project/28S/exp1/" , full.names = T)
read_file <- function(x) {
df <- readr::read_tsv(x, col_names = c("chrom", "start", "end", "count", "normalized_count", "dinuc"))
df$name <- basename(x)
df
}
table_28S <- purrr::map_df(data_files_28S, read_file) %>%
mutate(name = str_replace(name, ".r28s.bg", "")) %>%
separate(name, into = c('cell', 'virus', 'time'), sep = '_')
datatable(table_28S)